package io.kimmking.dubbo.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class Product implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "pro_id", type = IdType.AUTO)
    private Integer proId;

    private String proCode;

    private String proName;

    private float proPrice;

    private ProCol proColorType;

    private LocalDateTime proDate;

    private enum ProCol {

        GREEN("绿"),
        RED("红"),
        BLUE("蓝"),
        BLACK("黑");

        private final String colour;

        private ProCol(String colour){ this.colour = colour;}

        public String getCol(){
            return this.colour;
        }
    }

}
